package com.xhh.model.common.enums;

public enum AppHttpCodeEnum {

    // 成功段0
    SUCCESS(200,"操作成功"),
    // 登录段1~50
    NEED_LOGIN(1,"需要登录后操作"),
    LOGIN_PASSWORD_ERROR(2,"密码错误"),
    // TOKEN50~100
    TOKEN_INVALID(50,"无效的TOKEN"),
    TOKEN_EXPIRE(51,"TOKEN已过期"),
    TOKEN_REQUIRE(52,"TOKEN是必须的"),
    // SIGN验签 100~120
    SIGN_INVALID(100,"无效的SIGN"),
    SIG_TIMEOUT(101,"SIGN已过期"),
    // 参数错误 500~1000
    PARAM_REQUIRE(500,"缺少参数"),
    PARAM_INVALID(501,"无效参数"),
    PARAM_IMAGE_FORMAT_ERROR(502,"图片格式有误"),
    SERVER_ERROR(503,"服务器内部错误"),
    // 数据错误 1000~2000
    DATA_EXIST(1000,"数据已经存在"),
    AP_USER_DATA_NOT_EXIST(1001,"ApUser数据不存在"),
    DATA_NOT_EXIST(1002,"数据不存在"),
    // 数据错误 3000~3500
    NO_OPERATOR_AUTH(3000,"无权限操作"),
    NEED_ADMIND(3001,"需要管理员权限"),

    // 调剂志愿错误 3501-3600
    NEED_OVER_48_HOUR(3501, "修改志愿需要超过48小时"),
    NEED_NORMAL_PATTERN(3502, "非硕士研究生考试的考生不能参加调剂"),
    STUDENT_NOT_ONLINE(3503, "考生未达上线要求"),
    CHOICE_STATUS_EXCEPTION(3504, "调剂志愿状态异常"),

    // 复试通知错误 3601-3700
    INTERVIEW_NOTICE_ALREADY_ACCEPTED(3601, "复试通知已被接受"),
    NEED_NOTICE_ACCEPT_STATUS(3602, "通知未被接受"),
    NEED_NOTICE_SCHOOL_CANCEL_STATUS(3603, "待录取资格未被取消"),
    NEED_NOTICE_STUDENT_UNDO_STATUS(3604, "考生未申请解除资格"),
    ONLY_EXIT_ONE_ACCEPT_PREENROLL(3605, "只能接受一个待录取通知"),
    CONTENT_LENGTH_MUST_IN_200(3606, "通知内容必须在200字符之内");

    int code;
    String errorMessage;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.errorMessage = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
}
